Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-async-function-x

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-async-function-x

Determine if a function is a native aync function.

  • 2.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
472
increased by204.52%
Maintainers
1
Weekly downloads
 
Created
Source

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

is-async-function-x

Determine if a function is a native aync function.

See: 14.6 Async Function Definitions

module.exports(fn)boolean

Checks if value is classified as an Async Function object.

Kind: Exported function
Returns: boolean - Returns true if value is correctly classified, else false.

ParamTypeDescription
fn*The value to check.

Example

import isAsyncFunction from 'is--async-function-x';

isAsyncFunction(); // false
isAsyncFunction(Number.MIN_VALUE); // false
isAsyncFunction('abc'); // false
isAsyncFunction(true); // false
isAsyncFunction({ name: 'abc' }); // false
isAsyncFunction(function () {}); // false
isAsyncFunction(new Function ()); // false
isAsyncFunction(function* test1() {}); // false
isAsyncFunction(function test2(a, b) {}); // false
isAsyncFunction(class Test {}); // false
isAsyncFunction((x, y) => {return this;}); // false
isAsyncFunction(async functin() {}); // true

Keywords

FAQs

Package last updated on 28 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc